

def pre_object_save(sender, **kwargs):
	instance = kwargs["instance"]
	total_dollar_value = 0
	for coupon in instance.coupons.all():
		if coupon.dollar_value != None:
			total_dollar_value = coupon.dollar_value + total_dollar_value
	print "Total coupon value is $%s" % total_dollar_value

def post_object_save(sender, **kwargs):
	instance = kwargs['instance']
	coupons = instance.coupons.all()
	#total_dollar_value = 0
	#for coupon in instance.coupons.all():
		#total_dollar_value = coupon.dollar_value + total_dollar_value
	print "Total coupon value is $%s" % coupons #total_dollar_value